package br.ucb.sigplan.action.impl;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import br.ucb.sigplan.action.Action;
import br.ucb.sigplan.crud.CursoCrud;
import br.ucb.sigplan.crud.DisciplinaCrud;
import br.ucb.sigplan.crud.ProfessorCrud;

public class AbrirCadastraTurmaAction implements Action {

	@Override
	public String execute(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		req.getSession().setAttribute("professores", ProfessorCrud.findAll());
		req.getSession().setAttribute("disciplinas", DisciplinaCrud.findAll());
		req.getSession().setAttribute("cursos", CursoCrud.findAll());
		return "/jsp/diretor/turma/dirCadastraTurma.jsp";
	}

}
